package com.client.controller;

import com.client.service.UserAddressesService;
import com.client.utils.ResponseMsg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户收货地址表 前端控制器
 * </p>
 *
 * @author ckick
 * @since 2025-09-20 08:28:54
 */
@RestController
@RequestMapping("/userAddresses")
public class UserAddressesController {
    @Autowired
    private UserAddressesService userAddressesService;
    @GetMapping("getAddressesById/{userId}")
    public ResponseMsg getAddressesById(@PathVariable Integer userId){
        return ResponseMsg.getInstance(ResponseMsg.SUCCESS,
                "查询成功",userAddressesService.getAddressesById(userId));
    }
}
